package com.yoso.shop.interfaces.vo.cart;

import com.yoso.base.interfaces.vo.BaseVo;
import com.yoso.shop.interfaces.vo.commodity.CommodityVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author shizejin
 * @date 2022/1/29
 * @description:
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CartVo extends BaseVo {

    /**
     * 商品代码
     */
    @NotBlank(message = "产品编号不能为空")
    @ApiModelProperty("商品代码")
    private String commodityCode;
    /**
     * 商品名称
     */
    @ApiModelProperty("商品名称")
    private String commodityName;

    /**
     * 颜色
     */
    @ApiModelProperty("颜色")
    private String color;
    /**
     * 尺寸
     */
    @ApiModelProperty("尺寸")
    private String size;
    /**
     * 数量
     */
    @NotNull(message = "产品数量不能为空")
    @ApiModelProperty("数量")
    private Integer count;
    /**
     * 消费者id
     */
    @NotBlank(message = "用户id不能为空")
    @ApiModelProperty("消费者登录用户名")
    private String buyerId;
    /**
     * 消费者
     */
    @ApiModelProperty("消费者")
    private String buyerName;
    /**
     * 小计
     */
    @ApiModelProperty("小计")
    private String subtotal;
    /**
     * 单价
     */
    @ApiModelProperty("单价")
    private String price;

    @ApiModelProperty("商品信息")
    private CommodityVo commodity;

}
